package special;

import java.util.Collection;

/**
 * Testing the  ... keyword which seems new feature in recent jdk \
 * This gives java the ability to ingest a variable number of arguments
 * */
public class TestVarargs {
    public static void test(Object ... parameterTypes) {
        System.out.println(parameterTypes.getClass().getTypeName());
        for (Object i : parameterTypes) {
            System.out.println(i);
        }
    }
    public static void main(String[] args) {
//        test(int.class);
//        test(int.class, int[].class);
//        test(String.class,Byte[].class, Collection.class);
        test(1);
        test(1, 2);
        test(1,2,3);

    }
}
